import config from "../../config/index.js"
import http from "../http.js"
export default {
	// 获取验证码
	getCode: data => {
		return http(`/memberReceiveVercode`, '/app', 'post', data)
	},
	// 登录
	login: data => {
		return http(`/memberLoginVercode`, '/app', 'post', data)
	},
	// 微信code登录
	wxcodeLogin: data => {
		return http(`/wxcodeLogin`, '/wechat', 'post', data)
	},
	// 字典
	getSystruthKeyName: data => {
		return http(`/getSystruthKeyName`, '/app', 'post', data)

	},
	// 全部字典
	getSystruthList: () => {
		return http(`/getSystruthList`, '/app', 'post', )
	},
	// 上传
	upLoadImage: data => {
		return new Promise((resolve) => {
			uni.uploadFile({
				url: config.baseUrl + '/file/upgeturl',
				method: 'POST',
				...data,
				success: res => {
					console.log(res);
					resolve(JSON.parse(res.data))
				},
				fail: err => {
					console.log(err);
				}
			})
		})
	},
	// 根据位置信息获取广告列表
	getBannerlistAtarrange: (data) => {
		return http(`/getBannerlistAtarrange`, '/app', 'post', data)
	},
}